In this video tutorial you will learn how to Load A List Of Items In a Text File Into A List Box.
Code:http://www.youtube.com/watch?v=IyS7oJlzb7c&feature=related
In this video tutorial you will learn how to Load A List Of Items In a Text File Into A List Box.
Code:http://www.youtube.com/watch?v=IyS7oJlzb7c&feature=related
| Sponsored Links |
thanks for tut bro i need it
Or you could use:
And use it on button click.Code:OpenFileDialog1.Title = "Please select a text file" OpenFileDialog1.InitialDirectory = "C:\" OpenFileDialog1.ShowDialog() Dim FileToLoad As String FileToLoad = OpenFileDialog1.FileName.ToString() Dim fs As FileStream = New FileStream(FileToLoad, FileMode.Open) Dim sr As StreamReader = New StreamReader(fs) Do Until sr.EndOfStream ListBox1.Items.Add(sr.ReadLine()) Loop sr.Close() fs.Close()
Hope it helps :)
Bookmarks